package com.lxt.cloud.feign;

import com.lxt.cloud.entity.User;
import com.lxt.common.mvc.msg.output.ApiResult;
import com.lxt.common.vo.UserModel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Component
@FeignClient(name = "user-admin-service",path="/user")
public interface UserServiceFeign {
    @GetMapping("getUser")
//    feign在传参时@RequestParam注解必须指定参数名
    ApiResult<User> getUser(@RequestParam("userName") String userName);

    @GetMapping("check_login")
//    feign在传参时@RequestParam注解必须指定参数名
    ApiResult<UserModel> checkLogin(@RequestParam("userName") String userName);
}
